Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development
Adding dynamic combos and lookups to viewers
The most common addition to a viewer is likely to be a choice list for a foreign key field. A foreign key field is a field in one table whose value must come from a unique key in another table. Examples of foreign keys in the Sports2000 database are the
CustNumfield in theOrdertable, which is a foreign key for the uniqueCustNumkey in theCustomertable, and theSalesRepfield in theCustomertable, which is a foreign key for theSalesRepkey field in theSalesReptable.Progress Dynamics provides two different built-in visualizations for choice lists. Both are based on the SmartDataField SmartObject, which is a type of object designed to provide a specialized representation of a single field in a viewer.
You can learn more about SmartDataFields as a class, and about other specific objects of this type, in the standard OpenEdgeŽ documentation. If you are familiar with the standard ADM and SmartObjects, you should understand that the dynamic combo and lookup objects are very similar to the SmartSelect object, which can be visualized in several ways, including as either a lookup browser or a combo drop-down list. However, the dynamic combos and lookups in Progress Dynamics do not need a dedicated SDO for each object, which saves the overhead of that extra object. Also, when there is more than one combo or lookup on a viewer, they are coordinated so that data to populate all the objects in a viewer is retrieved from the server in a single call. They also have additional features not found in the SmartSelect.
An entire Progress procedure supports the visualization of the field so that you can associate any needed behavior with the field. The two standard Progress Dynamics objects of this type are:
These are dynamic objects because, in each case, an instance of the SmartDataField procedure supporting the object is added to the viewer’s field list. All the particulars of the field in that viewer are entered into a property sheet and stored in the Repository database.
There is also a set of static combo objects that you can use with Progress Dynamics. However, in almost all cases, the dynamic combo provides the same capabilities and more. In addition, it avoids the need to actually build and save individual procedure objects representing every different field that could have a combo box list for it. You can learn more about static combos in Progress Dynamics reference documentation. This chapter focuses strictly on the dynamic objects.
Note: When using a static viewer, do not alter combo boxes and selection lists to use a delimiter other than the comma.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |